package demo5.controller;

import demo5.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Controller将来用于和用户打交道(与浏览器交互部分)
 */
@Component
public class UserController {
    @Autowired
    private IUserService userService;
    public void doLogin(){
        System.out.println("UserController:用户登录业务");
        boolean success =  userService.login("admin","123456");
        if(success){
            System.out.println("UserController:用户登录成功");
        }else {
            System.out.println("User-Controller:用户登录失败");
        }
    }
}
